package cn.bugzy.serviceconsumer.controller;

import cn.bugzy.serviceconsumer.service.FeignHelloService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class HelloController {

    @Resource
    private FeignHelloService feignHelloService;

    @GetMapping("/hello/{name}")
    public String index(@PathVariable String name) {
        return feignHelloService.hello(name);
    }
}
